//#include<iostream>
//
//using namespace std;
//
//class Person
//{
//public:
//	virtual Person* fun1()
//	{
//		cout << "Person::func1()" << endl;
//	}
//};
//
//class Student : public Person
//{
//public:
//	virtual Student* fun1()
//	{
//		cout << "Student::func1()" << endl;
//	}
//};
//
//void Print(Person s)
//{
//	s.fun1();
//}
//
//int main()
//{
//	Student s;
//
//	Print(s);
//
//	return 0;
//}

#include<iostream>

using namespace std;

class A
{
public:
	virtual void Print()
	{
		cout << "this is A" << endl;
	}

	int a;
};

class B :public A
{
public:
	virtual void Print()
	{
		cout << "this is B" << endl;
	}

	virtual void test()
	{
		cout << "this is a test" << endl;
	}

	int b;
};

class C
{
public:
	virtual void Print()
	{
		cout << "this is C" << endl;
	}
private:
	int c;
};

int main()
{
	B b;

	cout << sizeof(b) << endl;
	return 0;
}